package com.xd.springboot.event;

import com.xd.springboot.entity.User;
import org.springframework.context.ApplicationEvent;

// 必须 extends ApplicationEvent
public class MyEvent extends ApplicationEvent {
    private User user;
    public MyEvent(Object source, User user) {
        super(source);
        this.user = user;
    }
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
